Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leaks related to the cache of securityStateReference. #143

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

y-iwata-bl
Copy link

Sorry for my late response.
Here is a pull request to fix the issue #93.

@CLAassistant
Copy link

CLAassistant commented Nov 6, 2024

CLA assistant check
All committers have signed the CLA.

@lextm lextm added the priority:low Low priority items. label Nov 7, 2024
@lextm
Copy link

lextm commented Nov 7, 2024

It isn't written in an ideal way as you put too many changes in one commit without any test cases. Thus, it's going to take a while for us to review before accepting it.

@lextm
Copy link

lextm commented Nov 7, 2024

Enabled the previous test case written for #93.

There are another 11 changes, and each requires a new test case.

@lextm
Copy link

lextm commented Nov 8, 2024

Instead of accepting this pull request as a whole, I decided to cherry-pick the necessary changes required by #93 first and shipped in release 7.1.13 with its test case. That branch might be hit more often, so shipping the fix earlier would make more sense.

Other changes, though useful, are associated with rarer cases that are much harder to trigger (and tested by test cases). So, I can gradually cherry-pick the rest when new test cases are created.

@@ -523,6 +526,9 @@ def prepare_response_message(
elif securityLevel == 3:
msgFlags |= 0x03
else:
if securityModel in snmpEngine.security_models:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def prepare_data_elements in rfc3412.py already blocked invalid msgFlags from being passed on, so it is impossible to have a securityLevel value here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pysnmp PySNMP package bug Something isn't working priority:low Low priority items.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants